@extends('layouts.auth')
@section('title',request()->get('type','个人租赁').'注册')
@section('content')
    <div class="login registeredBuchong">
        <div class="neirong">
            <form id="formOne" action="" method="post">
                {{csrf_field()}}
                @if(request()->get('type') == '公司租赁' )
                    <div class="foramTitle">{{request()->get('type','公司员工')}}注册</div>
                    <div class="item border margin-bottom12">
                        <img src="{{asset('icon/gongsixinxi@2x.png')}}" alt="">
                        <input oninput="inputChange()" type="text" id="name" disabled="true" value="京东物流（通州网点）">
                    </div>
                @else
                    <div class="foramTitle">{{request()->get('type','个人租赁')}}注册</div>
                @endif
                <div class="item border margin-bottom12">
                    <img src="{{asset('icon/userren@2x.png')}}" alt="">
                    <input type="text" id="name" name="name" placeholder="请输入您的姓名"
                           value="@if($user){{ $user->name }} @else {{ old('name') }} @endif  ">
                </div>
                <div class="item border margin-bottom12">
                    <img src="{{asset('icon/mobile@2x.png')}}" alt="">
                    <input maxlength="11" type="text" name="phone"
                           placeholder="请输入手机号">
                </div>
                <div class="item border margin-bottom12">
                    <img src="{{asset('icon/yanzhengma@2x.png')}}" alt="">
                    <input name="code" type="text" placeholder="请输入短信验证码">
                    <span id="sms" class="werixnhuoqu">获取验证码</span>
                </div>

                @if($socialite && $user)
                    <input name="socialite_id" type="hidden" value="{{ $socialite->id }}">
                    <input name="avatar" type="hidden" value="{{ $user->avatar }}">
                    <input name="gender" type="hidden" value="{{ $user->gender }}">
                @endif

                @if(request()->get('type') == '公司租赁')
                    <div class="sub">
                        <input id="bgSub" disabled="true" type="submit" value="提交审核">
                    </div>
                @else
                    <div class="sub">
                        <input id="bgSub" disabled="true" type="submit" value="注册并登录">
                    </div>
                @endif
            </form>
            <div class="goZhuCE">
                已有账号，<a href="{{route('login',['type'=>request()->get('type','个人租赁')])}}">去登录>>></a>
            </div>
        </div>
    </div>
@endsection


